/**
 * @file main.c
 * @author Ai-Thinker Seahi
 * @brief
 * @version 0.1
 * @date 2021-08-26
 *
 * @copyright Copyright (c) 2021
 *
 */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_wifi.h"
#include "driver/gpio.h"
#include "esp_log.h"
#include "esp_err.h"

#include "RGB_device.h"
#include "app_wifi.h"
#include "app_mqtt.h"
#include "ds18b20.h"
#include "app_oled.h"
#include "app_http.h"

void app_main(void)
{
    app_wifi_connect();
    app_mqtt_start();
    rgb_io_init();
    xTaskCreate(ds18b20_upCloud_Task, "ds18b20 read task", 1024 * 2, NULL, 11, NULL);
    xTaskCreate(oled_display_task, "oled display task", 1024 * 2, NULL, 12, NULL);
    xTaskCreate(http_request_weather, "http request weather task", 1024 * 2, NULL, 14, NULL);
}